package com.lightboat.system.domain;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.lightboat.common.annotation.Excel;
import com.lightboat.common.core.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 用户上下级关系对象 sys_user_hierarchy
 * 
 * @author lightboat
 * @date 2025-08-14
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Schema(title = "用户上下级关系")
@TableName("sys_user_hierarchy")
public class SysUserHierarchy extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    @Schema(title = "主键ID")
    @TableId
    private Long id;

    /** 用户ID */
    @Schema(title = "用户ID")
    @Excel(name = "用户ID")
    private Long userId;

    /** 上级领导ID */
    @Schema(title = "上级领导ID")
    @Excel(name = "上级领导ID")
    private Long leaderId;

    /** 关系类型（DIRECT直接上级, INDIRECT间接上级) */
    @Schema(title = "关系类型（DIRECT直接上级, INDIRECT间接上级)")
    @Excel(name = "关系类型", readConverterExp = "关系类型（DIRECT直接上级, INDIRECT间接上级)")
    private String relationType;


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("leaderId", getLeaderId())
            .append("relationType", getRelationType())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
